﻿Imports System.Data
Imports System.Data.SqlClient
Imports Entidad

Public Class PedidoPickeadorTiempoDatos

    Sub ingresarPedidoPickTiempo(ByVal ppt As PedidoPickeadorTiempo)

        Dim conex As New Conexion
        Dim coneccion As SqlConnection = conex.conectar()
        coneccion.Open()
        Dim query As String = "insert into PedidoPickeadorTiempo(CIA,SUC_Codigo,PED_Codigo,PICK_Codigo,EVE_Codigo,PPT_Fecha) " &
                              "values('01','01',@pedCodigo,@pickCodigo,@eveCodigo,getDate())"
        Dim comando As New SqlCommand
        With comando
            .Connection = coneccion
            .CommandText = query
            .Parameters.AddWithValue("@pedCodigo", ppt.PED_Codigo)
            .Parameters.AddWithValue("@pickCodigo", ppt.PICK_Codigo)
            .Parameters.AddWithValue("@eveCodigo", ppt.EVE_Codigo)
            .ExecuteNonQuery()
        End With

        coneccion.Close()

    End Sub

End Class
